package cn.as142.pojo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Arrays;

/**
 * @Author XiaoMo
 * @Date 2022/3/3 11:22
 * @Version 1.0
 */

@Component //将实例对象放入ioc
//读取配置文件 prefix = "user"表示前缀
@ConfigurationProperties(prefix = "user")
public class Users {
    private String username;
    private String password;
    private String[] address;

    @Override
    public String toString() {
        return "Users{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", address=" + Arrays.toString(address) +
                '}';
    }

    public String[] getAddress() {
        return address;
    }

    public void setAddress(String[] address) {
        this.address = address;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
